<div class="panel panel-default">
    <div class="panel-heading">

        <form class="search-form form-inline">
            <div class="form-group">
                <label>
                    <a>文章管理</a>
                    &nbsp;>>
                    <a>分类列表</a></label>
            </div>
            &nbsp;
            <div class="form-group">
                <label >
                    <select name="search_field" class="form-control">
                        <option value="a.cate_name" {if !empty($r_param['search_field'])&&$r_param['search_field']=='a.cate_name'}selected{/if}>
                            分类名称
                        </option>
                        <option value="b.cate_name" {if !empty($r_param['search_field'])&&$r_param['search_field']=='b.cate_name'}selected{/if}>
                            所属分类
                        </option>
                    </select>
                </label>
                <input type="hidden" name="act" value="{:url($act)}">
                <input type="text" class="form-control" name="search_value" value="{$r_param['search_value']??''}">
            </div>

            <button type="submit" class="ajax-btn btn btn-default">搜索</button>
            <button type="button" class="add-btn btn btn-info" data-url="{:url('admin/cate/add')}" data->新增</button>
        </form>

    </div>
    <div class="panel-body">
        <div class="table-responsive">
            <table class="table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>分类名称</th>
                    <th>所属分类</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name='list' id='item'}
                    <tr>
                        <td>{$item.id}</td>
                        <td>{$item.cate_name}</td>
                        <td>{$item.p_name}</td>
                        <td>
                            <div class="btn-group" role="group" aria-label="...">
                                <button type="button" data-url="{:url('admin/cate/edit')}" data-id="{$item.id}" class="add-btn btn btn-warning btn-sm">编辑</button>
                                <button type="button" data-url="{:url('admin/cate/del')}" data-id="{$item.id}" class="del-btn btn btn-danger btn-sm">删除</button>
                            </div>
                        </td>
                    </tr>
                {/volist}

                </tbody>
            </table>
            {$list->render()}
        </div>
    </div>
</div>
